<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

	</head>
	<body>
		<button type="button">操作元素类名</button>
		<div class="content">
			div标签
		</div>
	</body>
	<script type="text/javascript" charset="utf-8">
			
			//获取元素
			var box=document.querySelector('div')
			var btn=document.querySelector('button')
			
			//获取类名
			console.log(box.className)
			
			//绑定点击事件
			btn.onclick=function(){
				box.className='box'
			}
	</script>
</html>
